package com.wkq.move.module.search.frame.presenter

import com.wkq.base.frame.mosby.MvpBasePresenter
import com.wkq.move.module.search.frame.view.TvShowSearchView
import com.wkq.net.model.TvListsInfo
import com.wkq.net.net.UsTvShowDataCallBack
import com.wkq.net.net.UsTvShowHtmlUtil

/**
 * 作者: 吴奎庆
 *
 * 时间: 2020/5/23
 *
 * 简介:
 */
class TvShowSearchPresenter : MvpBasePresenter<TvShowSearchView>() {
    //获取搜索的数据
    fun getSearchData(content: String?) {
        UsTvShowHtmlUtil.getSearchList(content, object : UsTvShowDataCallBack<TvListsInfo> {
            override fun onFail(message: String?) {
            }

            override fun onSuccess(info: TvListsInfo?) {
                if (view != null) {
                    view.showSearchInfo(info)
                }
            }

            override fun onLoading() {
                TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
            }
        });

    }
}